<template>
	<view class="error-tip-container">
		<view class="error-tip-content">
			<image :src="searchNoDataImg" mode="aspectFill" class="error-tip-icon" />
			<view class="error-tip-detail">{{ errorTip }}</view>
		</view>
	</view>
</template>

<script>
import { common } from '@/pagesA/utils/common.js';
// import searchNoDataImg from '@/pagesA/assets/image/search-no-data.png';
const app = getApp();
export default {
	data() {
		return {
			searchNoDataImg: common.imgs.searchNoDataImg,
			errorTip: ''
		};
	},
	onLoad(options) {
		let errorTipObj = app.globalData.errorTip;
		let errorTip = '';
		if (errorTipObj.code || errorTipObj.errno) {
			errorTip += '错误码：' + errorTipObj.code || errorTipObj.errno;
		}
		if (errorTipObj.msg || errorTipObj.errMsg) {
			errorTip += '，' + errorTipObj.msg || errorTipObj.errMsg;
		}
		uni.setNavigationBarTitle({
			title: app.globalData.pageTitle
		});
		this.setData({
			errorTip
		});
		delete app.globalData.errorTip;
		delete app.globalData.pageTitle;
	},
	onShow() {},
	methods: {}
};
</script>
<style>
.error-tip-container {
	display: flex;
	align-items: center;
	height: 100vh;
}

.error-tip-content {
	width: 100%;
	box-sizing: border-box;
	padding: 0 64rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.error-tip-icon {
	width: 243rpx;
	height: 188rpx;
	margin-bottom: 48rpx;
}

.error-tip-detail {
	font-size: 32rpx;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #4b5680;
	word-break: break-all;
	padding: 0 32rpx;
}
</style>
